package com.ruoyi.wechat.open.service;
import com.ruoyi.wechat.open.domain.ApiParams;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

/**
 * 处理客户端必传参数
 */
@Component
public class ClientApiService
{
    /**
     * 获取客户端请求必传参数 jwid 和appid
     *
     * @return
     */
    public ApiParams getWxApiRequestParams(HttpServletRequest request)
    {
        // 获取请求携带的令牌
        String jwd = request.getParameter("jwid");
        String appId = request.getParameter("appId");
        return new ApiParams(jwd,appId);
    }
}
